/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package UISUTModel.impl;

import UISUTModel.ApplicationSystem;
import UISUTModel.UISUT;
import UISUTModel.UISUTModelPackage;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Application System</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link UISUTModel.impl.ApplicationSystemImpl#getItsUISUT <em>Its UISUT</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class ApplicationSystemImpl extends UISUTElementImpl implements ApplicationSystem {
	/**
	 * The cached value of the '{@link #getItsUISUT() <em>Its UISUT</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getItsUISUT()
	 * @generated
	 * @ordered
	 */
	protected UISUT itsUISUT;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected ApplicationSystemImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return UISUTModelPackage.Literals.APPLICATION_SYSTEM;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public UISUT getItsUISUT() {
		return itsUISUT;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetItsUISUT(UISUT newItsUISUT, NotificationChain msgs) {
		UISUT oldItsUISUT = itsUISUT;
		itsUISUT = newItsUISUT;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, UISUTModelPackage.APPLICATION_SYSTEM__ITS_UISUT, oldItsUISUT, newItsUISUT);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setItsUISUT(UISUT newItsUISUT) {
		if (newItsUISUT != itsUISUT) {
			NotificationChain msgs = null;
			if (itsUISUT != null)
				msgs = ((InternalEObject)itsUISUT).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - UISUTModelPackage.APPLICATION_SYSTEM__ITS_UISUT, null, msgs);
			if (newItsUISUT != null)
				msgs = ((InternalEObject)newItsUISUT).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - UISUTModelPackage.APPLICATION_SYSTEM__ITS_UISUT, null, msgs);
			msgs = basicSetItsUISUT(newItsUISUT, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, UISUTModelPackage.APPLICATION_SYSTEM__ITS_UISUT, newItsUISUT, newItsUISUT));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
		switch (featureID) {
			case UISUTModelPackage.APPLICATION_SYSTEM__ITS_UISUT:
				return basicSetItsUISUT(null, msgs);
		}
		return super.eInverseRemove(otherEnd, featureID, msgs);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case UISUTModelPackage.APPLICATION_SYSTEM__ITS_UISUT:
				return getItsUISUT();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case UISUTModelPackage.APPLICATION_SYSTEM__ITS_UISUT:
				setItsUISUT((UISUT)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case UISUTModelPackage.APPLICATION_SYSTEM__ITS_UISUT:
				setItsUISUT((UISUT)null);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case UISUTModelPackage.APPLICATION_SYSTEM__ITS_UISUT:
				return itsUISUT != null;
		}
		return super.eIsSet(featureID);
	}

} //ApplicationSystemImpl
